FROM openjdk:17-jdk-slim

ENV TZ=Asia/Shanghai

COPY --from=hengyunabc/arthas:3.6.9-no-jdk /opt/arthas /opt/arthas

COPY start/target/*.jar /app.jar

ENV JAVA_TOOL_OPTIONS=-XX:+StartAttachListener

RUN mkdir /logs && mkdir /storage

VOLUME ["/logs","storage"]

EXPOSE 8080

EXPOSE 32100

ENTRYPOINT ["java","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:32100","-jar","/app.jar"]